package initPackage;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import database.ConnectionHandler;

public class ShowCandidates
{
    public static void main( String[] args ) throws Exception
    {
        ConnectionHandler connH = new ConnectionHandler();
        Connection c = connH.getConnection();
        Statement st = c.createStatement();
        ResultSet rs = st.executeQuery( "SELECT * FROM candidate" );
        while( rs.next() )
            System.out.println( rs.getString( 1 ) + " " + rs.getString( 2 ) + " " + rs.getString( 3 ) );
        connH.closeConnection();
    }
}
